from fastapi import APIRouter

router = APIRouter(prefix="/products", tags=["商品管理"])

@router.get("/")
async def list_products():
    return [{"id": 1, "name": "Laptop"}]

@router.post("/")
async def create_product(name: str):
    return {"id": 2, "name": name}